﻿<Window x:Class="DocumentManagement.Views.PrintPreviewDocumentIn"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:DocumentManagement.ViewsModels"
        Title="PrintPreviewDocumentIn" Height="842" Width="825" Loaded="Window_Loaded" xmlns:my="clr-namespace:DocumentManagement.Converters" WindowStartupLocation="CenterScreen">
    
    <Window.Resources>
        <vm:PrintPreviewDocumentInViewsModel x:Key="printPreviewDocumentInViewsModel"/>
        <my:DateConverter x:Key="dateConverter" />
    </Window.Resources>
    <Grid Name="grid1">
        <ScrollViewer VerticalScrollBarVisibility="Auto" >
            <Grid Name="grid2" DataContext="{Binding Source={StaticResource printPreviewDocumentInViewsModel}}" Margin="0,37,0,0">
           
                <StackPanel Name="stackPanel1">
                    <!--<StackPanel Name="stackPanel2" Orientation="Horizontal">
                    <TextBlock Text="" FontFamily="TH SarabunPSK" FontSize="20"/>
                </StackPanel>-->
                    <StackPanel Name="stackPanel3" Orientation="Horizontal">
                        <Image Height="112" Name="image1" Source="/DocumentManagement;component/Images/pic.jpg" Stretch="Fill" Width="117" Margin="120,0,0,0"/>
                        <TextBlock Height="36" Name="textBlock1" Text="บันทึกข้อความ" FontFamily="TH SarabunPSK" FontSize="28" FontWeight="Bold" Margin="140,0,0,0" />
                    </StackPanel>
                  
                   
                    <StackPanel Name="stackPanel5" Orientation="Horizontal">
                        <TextBlock Text="ส่วนราชการ  " FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" FontWeight="Bold" />

                        <TextBlock Text="{Binding Path=MyPrintCreateSend.NameInstitution, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" />

                    </StackPanel>
                    <StackPanel Name="stackPanel6" Orientation="Horizontal" Margin="0">
                        <TextBlock Text="ที่  " FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" FontWeight="Bold" />
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.CreateSendCode, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" />
                        <TextBlock Text="วันที่  " FontFamily="TH SarabunPSK" FontSize="20" Margin="240,0,0,0" FontWeight="Bold" />
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.CreateSendDate, Mode=TwoWay, Converter={StaticResource dateConverter}}" FontFamily="TH SarabunPSK" FontSize="20"/>
                    </StackPanel>
                    <StackPanel Name="stackPanel7" Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="{Binding Path=Title, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,40,0" />
                    </StackPanel>
                    <StackPanel Name="stackPanel8" Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="{Binding Path=ToPosition, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,40,0" TextWrapping="Wrap" />
                    </StackPanel>
                    <!--<StackPanel Name="stackPanel9" Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,40,0" TextWrapping="Wrap" />
                    </StackPanel>-->
                    <!--<StackPanel Name="stackPanel10" Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Text="สิ่งที่ส่งมาด้วย  " FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" />
                        <ListBox ItemsSource="{Binding Path=MyCreateSendICV, Mode=TwoWay}" DisplayMemberPath="NameAttached" FontFamily="TH SarabunPSK" FontSize="20" BorderThickness="0" />
                    </StackPanel>-->
                    <StackPanel Name="stackPanel11" Orientation="Vertical" Margin="0,10,0,0">
                        <TextBox Text="{Binding Path=MyPrintCreateSend.Paragraph1, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" Margin="120,0,40,0"  VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" BorderThickness="0"/>
                    </StackPanel>
                    <!--<StackPanel Name="stackPanel12" Orientation="Vertical" Margin="0,10,0,0">
                        <TextBox Text="{Binding Path=Paragraph2, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" Margin="120,0,40,0" VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" BorderThickness="0"/>
                    </StackPanel>
                    <StackPanel Name="stackPanel13" Orientation="Vertical" Margin="0,10,0,0">
                        <TextBox Text="{Binding Path=Paragraph3, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" Margin="120,0,40,0" VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" BorderThickness="0"/>
                    </StackPanel>-->
                    <StackPanel Name="stackPanel14" Orientation="Vertical" Margin="0,20,0,0">
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.PostScript, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20"  Margin="160,0,0,0" TextAlignment="Center" />
                    </StackPanel>
                    <StackPanel Name="stackPanel15" Orientation="Vertical" Margin="0,60,0,0">
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.Endorser, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20"  Margin="160,0,0,0" TextAlignment="Center" />
                    </StackPanel>
                    <StackPanel Name="stackPanel16" Orientation="Vertical">
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.Position, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20"  Margin="160,0,0,0" TextAlignment="Center" />
                    </StackPanel>
                    <!--<StackPanel Name="stackPanel17" Orientation="Vertical">
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.BelongTo, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20"  Margin="220,0,0,0" TextAlignment="Center" />
                    </StackPanel>-->
                    <!--<StackPanel Name="stackPanel18" Orientation="Vertical" Margin="0,40,0,0">
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.Division.ThaiName, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" />
                    </StackPanel>-->
                    <!--<StackPanel Name="stackPanel19" Orientation="Horizontal">
                        <TextBlock Text="โทร. " FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" />
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.Tell, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" />
                    </StackPanel>-->
                    <!--<StackPanel Name="stackPanel20" Orientation="Horizontal">
                        <TextBlock Text="โทรสาร. " FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,0,0" />
                        <TextBlock Text="{Binding Path=MyPrintCreateSend.Fax, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20" />
                    </StackPanel>-->
                </StackPanel>

           
        </Grid>
        </ScrollViewer>
        <Button Content="Print" Height="23" HorizontalAlignment="Left" Margin="377,1,0,0" Name="PrintButton" VerticalAlignment="Top" Width="75" Click="PrintButton_Click" />
    </Grid>
</Window>
